package com.tuozixuan.lang3.builder;

import org.apache.commons.lang3.builder.CompareToBuilder;

public class CompareToBuilderDemo {

	public static void main(String[] args) {
		
		System.out.println(CompareToBuilder.reflectionCompare("111", "22"));

		Fruit fruit1 = new Fruit("Orange", "Orange");
		Fruit fruit2 = new Fruit("Watermelon", "Red");

		if (fruit1.compareTo(fruit2) == 0) {
			System.out.printf("%s == %s%n", fruit1.getName(), fruit2.getName());
		} else {
			System.out.printf("%s != %s%n", fruit1.getName(), fruit2.getName());
		}
		System.out.println(CompareToBuilder.reflectionCompare(fruit1, fruit2));
	}

}
